
<extend name="Common/header"/>

<block name="content">
<section class="container">
<div class="content-wrap">
<div class="content">
  <div class="title">
	<h3 style="line-height: 1.3">{$cat_name}</h3>
  </div>
  <volist name="blogs" id="v">
  <article class="excerpt excerpt-1"><a class="focus" href="javascript:" onclick="blog_details({$v['id']},'{:U('BlogDetails/index',array('blog_id'=>$v['id']))}',{$v['money']})" title="{$v['title']}" target="_blank" ><img class="thumb" data-original="{$v['theme']}" src="{$v['theme']}" alt="{$v['title']}"  style="display: inline;"></a>
	<header><a class="cat" href="javascript:" onclick="blog_details({$v['id']},'{:U('BlogDetails/index',array('blog_id'=>$v['id']))}',{$v['money']})" title="{$cat_name} >{$cat_name}<i></i></a>
	  <h2><a href="javascript:" onclick="blog_details({$v['id']},'{:U('BlogDetails/index',array('blog_id'=>$v['id']))}',{$v['money']})" title="{$v['title']}" target="_blank" >{$v['title']}</a></h2>
	</header>
	<p class="meta">
	  <time class="time"><i class="glyphicon glyphicon-time"></i> {$v['time']|date='Y-m-d',###}</time>
	  <span class="views"><i class="glyphicon glyphicon-eye-open"></i> 217</span> 
	  <a class="comment" href="##comment" title="评论" target="_blank" ><i class="glyphicon glyphicon-comment"></i> {$v['contact_count']}</a>
	  <span class="views">价格：<if condition="$v['money'] == 0">免费<else/>{$v['money']}</if></span>
	  </p>
	<p class="note">{$v['description']}</p>
  </article>
  </volist>
  
  <nav class="pagination" style="display: none;">
	{$show}
  </nav>
</div>
</div>
<aside class="sidebar">
<div class="fixed">
  <div class="widget widget_search">
	<form class="navbar-form" action="{:U('Search/index')}" method="get">
	  <div class="input-group">
		<input type="text" name="keyword" class="form-control" size="35" placeholder="请输入关键字" maxlength="15" autocomplete="off">
		<span class="input-group-btn">
		<button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
		</span> </div>
	</form>
  </div>
  <div class="widget widget_sentence">
	<h3>标签云</h3>
	<div class="widget-sentence-content">
		<ul class="plinks ptags">   
		<volist name="keys" id="v">             
			<li><a href="#list/67/" style='font-size:{$v['font']}px;' title="{$v['key_name']}" draggable="false">{$v['key_name']} <span class="badge">{$v['count']}</span></a></li>         
		</volist>    
		</ul>
	</div>
  </div>
</div>
{:W('New/hotBlog')}
 <div class="widget widget_sentence">    
	<a href="#" target="_blank" rel="nofollow" title="专业网站建设" >
	<img style="width: 100%" src="__PUBLIC_HOME__images//201610241224221511.jpg" alt="专业网站建设" ></a>    
 </div>

</div>
</aside>
</section>
<footer class="footer">
<div class="container">
<p>{$copyright}</p>
</div>
<div id="gotop"><a class="gotop"></a></div>
</footer>
<script>
	function blog_details(id,url,money){
		if(money == 0){
			location.href = url;return;
		}
		$.post('{:U("checkDetails")}',{blog_id:id},function(data){
			if(data.state == -1){
				$('#login').click();
			}else if(data.state == 1){
				location.href = url;return;
			}else{
				layer.confirm('是否购买该文章，价格为：'+money, {
					btn:['购买','取消'] //按钮
					}, function(){
						$.post('{:U("buyBlog")}',{blog_id:id,money:money},function(res){
							if(res.state == 0){
								layer.msg(res.msg,{icon:5,time:1000});
							}else{
								layer.msg('购买成功',{icon:6,time:1000});
							}
						});
					});
			}
		});
	}
</script>
</block>
